package com.gitee.huanminabc.db_freedom.segments;


import com.gitee.huanminabc.db_freedom.utils.SqlFunction;

/**
 * 条件实现类
 * @param <T>
 * @param <Children>
 */
public abstract class SqlConditionImplSegments <T, Children extends SqlCombineImplSegments<T, Children>>    extends SqlCombineImplSegments<T, Children> implements SqlConditionSegments<Children, T, SqlFunction<T, ?>> {

    public SqlConditionImplSegments() {
    }
    public SqlConditionImplSegments(Class<?> entityClass, com.gitee.huanminabc.db_freedom.wrapper.SQL sql) {
        super(entityClass, sql);
    }
    @Override
    public Children EQ() {
        SQL().append(" = ");
        return typedThis;
    }

    @Override
    public Children NE() {
        SQL().append(" != ");
        return typedThis;
    }

    @Override
    public Children GT() {
        SQL().append(" > ");
        return typedThis;
    }

    @Override
    public Children GE() {
        SQL().append(" >= ");
        return typedThis;
    }

    @Override
    public Children LT() {
        SQL().append(" < ");
        return typedThis;
    }

    @Override
    public Children LE() {
        SQL().append(" <= ");
        return typedThis;
    }

    @Override
    public Children BETWEEN() {
        SQL().append(" BETWEEN ");
        return typedThis;
    }

    @Override
    public Children NOT_BETWEEN() {
        SQL().append(" NOT BETWEEN ");
        return typedThis;
    }

    @Override
    public Children LIKE() {
        SQL().append(" LIKE ");
        return typedThis;
    }

    @Override
    public Children IN() {
        SQL().append(" IN ");
        return typedThis;
    }

    @Override
    public Children NOT_IN() {
        SQL().append(" NOT IN ");
        return typedThis;
    }

    @Override
    public Children IS_NULL() {
        SQL().append(" IS NULL ");
        return typedThis;
    }


    @Override
    public Children IS_NOT_NULL() {
        SQL().append(" IS NOT NULL ");
        return typedThis;
    }

}
